
package com.be.beadmin.design.service;

import com.be.beadmin.common.entity.PageEntity;
import com.be.beadmin.design.dto.input.StandFileInfoByStandTypeIdAndCategoryPage;
import com.be.beadmin.design.dto.input.StandFileInfoDto;
import com.be.beadmin.design.dto.output.StandFileInfoEx;
import com.be.beadmin.design.entity.StandFileInfo;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @description 服务接口
 * @author Jiahao Liu
 * @date 2023-02-16
 **/
public interface StandFileInfoService {

    /**
     * 分页的查询接口
     * @param pageEntity
     * @return
     */
    Page<StandFileInfoEx> getStandFileInfoByPage(PageEntity pageEntity);

    /**
     * @param standFileInfoDto
     */
    void addStandFileInfo(StandFileInfoDto standFileInfoDto);

    /**
     * @param standFileInfoDto
     */
    void updateStandFileInfo(StandFileInfoDto standFileInfoDto);

    /**
     * @param id
     */
    void delStandFileInfo(String id);

    /**
     * 删除多个角色
     * @param ids
     */
    void delStandFileInfos (List<String> ids);

    /**
     * 标准柜体附件类型
     * @param
     */
    List<String> getStandFileType();

    /**
     * 标准柜体附件上传BOM
     * @param
     */
    List<Object> uploadStandFileInfoBom(String standTypeId,String standTypeDesc,String standTypeCode, String standTypeName, String categorye, MultipartFile multipartFile, String memo, String bucketName) throws Exception;


    void downloadStandFile(String standFileId, HttpServletResponse response);

    StandFileInfo getFileByFileCode(String fileCode);

    void uploadStandFileInfoDrawing(String standTypeId, String standTypeDesc, String standTypeCode, String standTypeName, String category, MultipartFile[] multipartFiles, String memo, String bucketName) throws Exception;

    Page<StandFileInfoEx> getStandFileInfoByStandTypeIdAndCategoryPage(StandFileInfoByStandTypeIdAndCategoryPage standFileInfoByStandTypeIdAndCategoryPage);

    void switchStandFileInfo(String standFileInfoId, String standTypeId, String category,int status);

    String getPreviewUrl(StandFileInfoDto standFileInfoDto) throws Exception;
}